using System;
using System.Collections.Generic;
using System.Linq;
using DomainModel;

namespace EntityFrameworkRepository
{
    public class PanneRepository : IPanneRepository
    {
        private readonly TechDays2012Db _context;

        public PanneRepository()
        {
            _context = TechDays2012Db.Instance;
        }

        public void Add(Panne item)
        {
            throw new NotImplementedException();
        }

        public void Remove(int id)
        {
            throw new NotImplementedException();
        }

        public void Update(Panne item)
        {
            //_context.ObjetPatrimonial.Find(ObjetPatrimonial.)
        }

        public Panne Find(int id)
        {
            return _context.Pannes.Find(id);
        }

        public List<Panne> FindAll()
        {
            return _context.Pannes.ToList();
        }

        public void SaveChanges()
        {
            throw new NotImplementedException();
        }
    }
}